@extends('WShop::layout')
@section('content')
    @push('styles')
    <style type="text/css">
        .mui-navigate-right:after, .mui-push-right:after {
            content: '';
        }
    </style>
    @endpush
    @include('WShop::public.header')
    <div class="mui-content mui-scroll-wrapper" id="pullrefresh">
        <div class="mui-scroll">
            <div class="mui-table-view mui-table-view-chevron mui-bottom">
                <div class="mui-queren-dingdan ">

                        <ul class="mui-table-view bg-fff">
                            <li style="background: #f2f2f2;height: 10px;"></li>
                            <li class="mui-table-view-cell time">
                                <div class="dtime_header">订单编号：{{$info->order_sn}}
                                    <span class="mui-pull-right mui-text-green"> {{config('shop.order_status')[$info->status]}}</span>
                                </div>
                            </li>

                            <li class="mui-table-view-cell time">
                                <div class="dtime_header">下单时间：{{$info->created_at}}
                                </div>
                            </li>

                            <li class="mui-table-view-cell" style="margin-bottom: 0!important;margin-top: -10px!important;">
                                <a class="mui-navigate-right mui-clearfix post-addr" href="javascript:void(0);">
                                        <div class="mui-pull-left">
                                            <div>收货人：{{$info->consignee}}</div>
                                            <div>联系方式：{{$info->phone}}</div>
                                            <div>收货地址：{{$info->post_address}}</div>
                                        </div>
                                </a>
                            </li>

                            <li class="mui-table-view-cell" style="margin-bottom: 0!important;">
                                <a class="mui-navigate-right mui-clearfix post-addr" href="javascript:void(0);">
                                    <div class="mui-pull-left">
                                        <div>支付方式：{{config('shop.pay_type')[$info->pay_type]}}</div>
                                        <div>订单区域：{{config('shop.zone')[$info->goods_zone]}}</div>
                                    </div>
                                </a>
                            </li>

                            <li class="mui-table-view-cell" style="margin-bottom: 0!important;">
                                <a class="mui-navigate-right mui-clearfix post-addr" href="javascript:void(0);">
                                    <div class="mui-pull-left">
                                        <div>配送方式：@if($info->status >=2){{get_expresses()[$info->express_name]}} @else未发货@endif</div>
                                        <div>物流单号：@if($info->status >=2){{$info->express_num}} @else未发货@endif</div>
                                    </div>
                                </a>
                            </li>

                            <li style="background: #f2f2f2;height: 10px;"></li>
                            @foreach($info->goods as $item)
                            <li class="mui-table-view-cell time">

                                    <div class="time_header">
                                        商品小计<span class="mui-pull-right mui-text-red">{{$item->pay_money}}</span>
                                    </div>
                                    <div class="mui-dingdan-xx bg-fff flex">
                                        <img src="{{str_first($item->goods_img)}}" alt="" class="mui-pull-left" />
                                        <div class="mui-pull-right">
                                            <h4>{{$item->goods_name}}</h4>
                                            <div style="padding-left: 10px;color: #999;">{{$item->goods_spec}}</div>
                                            <div class="mui-text-left" style="position: relative;">
                                                <div style="margin-bottom: 10px;">￥<span>{{$item->price}}</span> <span class="mui-pull-right">X{{$item->number}}</span></div>
                                            </div>
                                        </div>
                                    </div>
                            </li>
                            @endforeach
                        </ul>

                        <ul class="mui-table-view bg-fff">
                                <li class="mui-table-view-cell">
                                    <a href="javascript:void (0);" >
                                        商品合计
                                        <span style="float: right;color: red;margin-right: 30px;">{{$info->goods_price}}</span>
                                    </a>
                                    <a href="javascript:void (0);" >
                                        运费
                                        <span style="float: right;color: red;margin-right: 30px;">{{$info->post_cost}}</span>
                                    </a>
                                    <a href="javascript:void (0);" >
                                       抵扣金额
                                        <span style="float: right;color: red;margin-right: 30px;">{{$info->pay_xf_points}}</span>
                                    </a>
                                </li>
                        </ul>

                </div>
            </div>
        </div>
    </div>
    <div class="mui-bar mui-bar-footer" style=" height: 50px;">
        <div class="flex">
            <div class="flex-item">
                <div class="mui-text-red">应付：￥ <b id="pay-count" class="count mui-text-red" >{{$info->total_price}}</b></div>
            </div>
            <div class="flex-item mui-text-right">
                <span class="mui-btns" style="margin:0 -10px 0 0;background: #673AB7;width: 100%;height: 50px;line-height: 50px;border-radius: 2px;float: right;">实付：￥ <b id="pay-count" class="count mui-text-red" >{{$info->pay_price}}</b></span>
            </div>
        </div>
    </div>

@endsection
@push('scripts')

@endpush